<?php

Loader::loadClass('InnoUtil', "modules/IShopUser/pnincludes");

function IShopUser_pntables()
{
    // Initialise table array
    $pntable = array();

    ////////////////////////////////////////////
    //table information 
    ////////////////////////////////////////////
    $pntable['ishopuser_information'] = DBUtil::getLimitedTablename('ishopuser_information');
    $pntable['ishopuser_information_column'] = array(
                                        'uid'               => 'info_uid',
                                        'firstname'         => 'info_firstname',
                                        'lastname'          => 'info_lastname',
                                        'mobilephone'       => 'info_mobilephone',
                                        'gender'            => 'info_gender',
                                        'house_no'          => 'info_house_no',                                        
                                        'moo'               => 'info_moo',                                           
                                        'soi'               => 'info_soi',                                         
                                        'road'              => 'info_road',                                         
                                        'village'           => 'info_village', 
                                        'tambon'            => 'info_tambon', 
                                        'district'          => 'info_district',                                                                                                                         
                                        'province'          => 'info_province', 
                                        'zipcode'           => 'info_zipcode',                                                                                 
                                        'shop_subdomain'    => 'info_shop_subdomain',
                                        'shop_domain'       => 'info_shop_domain',
                                        'shop_name'         => 'info_shop_name',
                                        'shop_database'     => 'info_shop_database',
                                        'shop_description'  => 'info_shop_description',                                                                                
                                        'shop_icon'         => 'info_shop_icon',                                                                                
                                        'shop_theme'        => 'info_shop_theme'                                                                                                                                                                                                                                                                                               
    );
    $pntable['ishopuser_information_column_def'] = array(
                                        'uid'               => 'INT(11) NOTNULL PRIMARY',
                                        'firstname'         => 'VARCHAR(255)',
                                        'lastname'          => 'VARCHAR(255)',
                                        'mobilephone'       => 'VARCHAR(50)',
                                        'gender'            => 'INT(1) DEFAULT 1',
                                        'house_no'          => 'VARCHAR(50)',                                        
                                        'moo'               => 'VARCHAR(50)',                                           
                                        'soi'               => 'VARCHAR(50)',                                         
                                        'road'              => 'VARCHAR(50)',                                         
                                        'village'           => 'VARCHAR(255)', 
                                        'tambon'            => 'VARCHAR(255)', 
                                        'district'          => 'VARCHAR(255)',                                                                                                                         
                                        'province'          => 'VARCHAR(255)', 
                                        'zipcode'           => 'INT(5)',                                                                                 
                                        'shop_subdomain'    => 'VARCHAR(255)',
                                        'shop_domain'       => 'VARCHAR(255)',
                                        'shop_name'         => 'VARCHAR(255)',
                                        'shop_database'     => 'VARCHAR(255)',
                                        'shop_description'  => 'TEXT',                                        
                                        'shop_icon'         => 'TEXT',                                        
                                        'shop_theme'        => 'VARCHAR(255)'                                             
    );                                        
    $pntable['ishopuser_information_primary_key_column'] = 'id';

    // add standard data fields
    ObjectUtil::addStandardFieldsToTableDefinition ($pntable['ishopuser_information_column'], 'information_');
    ObjectUtil::addStandardFieldsToTableDataDefinition($pntable['ishopuser_information_column_def']);


    return $pntable;
}